edit reference in place